<?php
namespace app\common\model;

use think\Model;

class MemberZengsongLog extends Base
{
    protected $table = 'member_zengsong_logs';

    public function getCreateTimeLabelAttr($value, $data)
    {
        if (empty($data['create_time'])) {
            return '暂无';
        }

        return date('Y-m-d H:i:s', $data['create_time']);
    }
    
    public function getTypeLabelAttr($value, $data)
    {
        $name = '';
        switch ($data['type']) {
            case 'insure_zengsong':
                $name = '赠送寿险';
                break;
            case 'insure_insure':
                $name = '出游意外险';
                break;
        }
        
        return $name;
    }
    
}